<template>
<div>
  <h2>这是Count</h2>
<!--错误写法:子组件不能直接更改父组件中的数据-->
<!--  <button @click="count++">查看</button> -->
  <p>count:{{count}}</p>
  <p>name:{{name}}</p>
  <p>title:{{name}}</p>
  <p>otherTitle:{{otherTitle}}</p>
</div>
</template>


<script>
export default {
  name:"count",
  data(){
    return{
      count:0,
    }
  },
  props:{
    count:Number,
    name:String,
    title:String,
    otherTitle:String
  },
  methods:{
    add(){
      console.log(this);
      console.log(this.count)
      console.log(this.$props)
    }
  }
}
</script>


<style scoped>
</style>